package com.pignest.hotel.beans;

import java.util.Date;

import org.directwebremoting.annotations.RemoteProperty;

import com.pignest.hotel.beans.global.BaseBean;
import com.pignest.hotel.definition.BillType;
import com.pignest.hotel.definition.OpenRoomType;

public class HotelBill extends BaseBean {

	/**
	 * 酒店票据
	 */
	private static final long serialVersionUID = -2210943489914385575L;

	/**入住*/
	private Living living;
	
	/**CHECK("结账","C"),DEPOSIT(存款,"D"),LIVING("入住","L");CHANGEROOM("换房","R")*/
	private String type;
	/**结账单据号类型+入住时间号*/
	private String orderNo;
	/**房间号*/
	private String roomName;
	/**房间类型*/
	private String roomType;
	/**房价*/
	private int roomPrice;
	/**押金*/
    private int deposit;
   /**折扣价、调整价*/	
	private int adjustPrice;
	/**客户名字*/
	private String name;
	/**客户证件类型*/
	private String cerType;
	/**证件号*/
	private String cerNo;
	/**入住时间*/
	private Date liveTime;
	/**开房方式*/
	private String openType;
	/**入住天数*/
	private float liveCount;
	/**离开时间*/
	private Date leaveTime;
	/**房租*/
	private int rent;
	/**消费*/
	private int cost;
	/**结账金额*/
	private int accounts;
	/**退款金额*/
	private int refundment;
	/**服务费用如洗衣费用、非酒店主营项目清洗费*/
	private int service;
	
	/**赔偿费*/
	private int reparation;
	/**支付方式*/
	private String payment;
	/**操作人*/
	private String operator;
	
	private Date opTime;
	/**打印时间*/
	private Date printTime;
	/**是否打印 0 未打印，1已打印*/
	private int isPrint;
	
	private String oldRoomName;
	
	private String remark;
	public Living getLiving() {
		return living;
	}
	public void setLiving(Living living) {
		this.living = living;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getOrderNo() {
		return orderNo;
	}
	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}
	public String getRoomName() {
		return roomName;
	}
	public void setRoomName(String roomName) {
		this.roomName = roomName;
	}
	public String getRoomType() {
		return roomType;
	}
	public void setRoomType(String roomType) {
		this.roomType = roomType;
	}
	
	public int getRoomPrice() {
		return roomPrice;
	}
	public void setRoomPrice(int roomPrice) {
		this.roomPrice = roomPrice;
	}
	public int getDeposit() {
		return deposit;
	}
	public void setDeposit(int deposit) {
		this.deposit = deposit;
	}
	public int getAdjustPrice() {
		return adjustPrice;
	}
	public void setAdjustPrice(int adjustPrice) {
		this.adjustPrice = adjustPrice;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCerType() {
		return cerType;
	}
	public void setCerType(String cerType) {
		this.cerType = cerType;
	}
	public String getCerNo() {
		return cerNo;
	}
	public void setCerNo(String cerNo) {
		this.cerNo = cerNo;
	}
	
	public String getOpenType() {
		return openType;
	}
	public void setOpenType(String openType) {
		this.openType = openType;
	}
	public float getLiveCount() {
		return liveCount;
	}
	public void setLiveCount(float liveCount) {
		this.liveCount = liveCount;
	}
	
	public Date getLiveTime() {
		return liveTime;
	}
	public void setLiveTime(Date liveTime) {
		this.liveTime = liveTime;
	}
	public Date getLeaveTime() {
		return leaveTime;
	}
	public void setLeaveTime(Date leaveTime) {
		this.leaveTime = leaveTime;
	}
	public int getRent() {
		return rent;
	}
	public void setRent(int rent) {
		this.rent = rent;
	}
	public int getCost() {
		return cost;
	}
	public void setCost(int cost) {
		this.cost = cost;
	}
	public int getAccounts() {
		return accounts;
	}
	public void setAccounts(int accounts) {
		this.accounts = accounts;
	}
	public int getRefundment() {
		return refundment;
	}
	public void setRefundment(int refundment) {
		this.refundment = refundment;
	}
	public int getService() {
		return service;
	}
	public void setService(int service) {
		this.service = service;
	}
	
	public int getReparation() {
		return reparation;
	}
	public void setReparation(int reparation) {
		this.reparation = reparation;
	}
	public String getPayment() {
		return payment;
	}
	public void setPayment(String payment) {
		this.payment = payment;
	}
	public String getOperator() {
		return operator;
	}
	public void setOperator(String operator) {
		this.operator = operator;
	}
	public Date getPrintTime() {
		return printTime;
	}
	public void setPrintTime(Date printTime) {
		this.printTime = printTime;
	}
	public int getIsPrint() {
		return isPrint;
	}
	public void setIsPrint(int isPrint) {
		this.isPrint = isPrint;
	}
	
	public Date getOpTime() {
		return opTime;
	}
	public void setOpTime(Date opTime) {
		this.opTime = opTime;
	}
	
	public String getOldRoomName() {
		return oldRoomName;
	}
	public void setOldRoomName(String oldRoomName) {
		this.oldRoomName = oldRoomName;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	@RemoteProperty
	public String getIsPrint2()
	{
		switch (isPrint) {
		case 0:
			return "否";
		case 1:
			return "是";
		default:
			break;
		}
		return "";
	}
	@RemoteProperty
	public String getOpenType2()
	{
		if(openType==null)
			return "";
		else
		return 	OpenRoomType.valueof(openType).getDisplayName();
	}
	public String getType2()
	{
		if(type==null)
			return "";
		else
			return BillType.valueOf(type).getCname();
	}
	
	@Override
	public String toSimpleString() {
		return concat(type, orderNo, roomName);
	}
}
